import datetime

from pydantic import BaseModel, Field
from typing import Optional, List


class OrderApproveModel(BaseModel):
    id: Optional[int] = Field(None, primary_key=True)
    order_id: Optional[str] = Field(None, comment='单号')
    create_time: Optional[datetime.datetime] = Field(None, comment='创建时间')
    state: Optional[int] = Field(None, comment='审批状态')
    result: Optional[str] = Field(None, comment='审批结果')
    remark: Optional[str] = Field(None, comment='审批备注')
    approve_id: Optional[str] = Field(None, comment='审批人')
    approve_time: Optional[datetime.datetime] = Field(None, comment='审批时间')
    create_by: Optional[str] = Field(None, comment='创建人')
    update_time: Optional[datetime.datetime] = Field(None, comment='修改时间')
    update_by: Optional[Optional[str]] = Field(None, comment='修改人')

class OrderModelForApprove(BaseModel):
    id: Optional[int] = Field(None, title="id")
    result: Optional[str] = Field(None, title="pass通过 refuse拒绝")
    remark: Optional[str] = Field(None, title="备注")
